<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>{{ title if title else '饮水机数据记录' }}</title>
    <link href="https://stackpath.bootstrapcdn.com/bootstrap/4.5.2/css/bootstrap.min.css" rel="stylesheet">
    <style>
        body {
            background-color: #f0f2f5;
        }
        .navbar {
            margin-bottom: 20px;
        }
        .form-section, .list-section {
            padding: 20px;
            border-radius: 8px;
        }
        .form-section {
            background-color: #f8f9fa;
            border: 1px solid #e9ecef;
        }
        .list-section {
            background-color: #ffffff;
            border: 1px solid #dee2e6;
        }
        .page-link {
            cursor: pointer;
        }
        .centered-form {
            display: flex;
            justify-content: center;
            align-items: center;
            min-height: 80vh;
        }
        .form-container {
            width: 100%;
            max-width: 600px;
            padding: 20px;
            border-radius: 8px;
            background-color: #fff;
            box-shadow: 0 0 10px rgba(0,0,0,0.1);
        }
    </style>
</head>
<body>
    <nav class="navbar navbar-expand-lg navbar-dark bg-dark">
        <a class="navbar-brand" href="/">饮水机数据记录</a>
        <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarNav" aria-controls="navbarNav" aria-expanded="false" aria-label="Toggle navigation">
            <span class="navbar-toggler-icon"></span>
        </button>
        <div class="collapse navbar-collapse" id="navbarNav">
            <ul class="navbar-nav ml-auto">
                <li class="nav-item{% if request.path == '/' %} active{% endif %}">
                    <a class="nav-link" href="/">首页</a>
                </li>
                <li class="nav-item{% if request.path == '/predict' %} active{% endif %}">
                    <a class="nav-link" href="/predict">猜一猜</a>
                </li>
            </ul>
        </div>
    </nav>
    <div class="container">
        {% block content %}
        {% endblock %}
    </div>
    <script src="{{ url_for('static', filename='js/jquery-3.7.1.min.js') }}"></script>
    <script src="{{ url_for('static', filename='js/bootstrap.js') }}"></script>
</body>
</html>
